package nz.ac.massey.doi_information_extractor.main;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.*;

public class Mp3Player extends Thread{

	/**
	 * @param args
	 */
	public Mp3Player() {
		
		String filename = "ABRCOTB.mp3";
		try {
			AudioDevice audioDevice = FactoryRegistry.systemRegistry().createAudioDevice();
			Player mp3Player = new Player(new FileInputStream(filename), audioDevice);
			mp3Player.play();
		} catch (JavaLayerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}		
	}

}
